#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int main()
{
	ll a, b, n;
	ll week = 0;
	cin >> a >> b >> n;
	week = n / (a * 5 + b * 2);
	n = n % (a * 5 + b * 2);
	int day = 0;
	while (n > 0&&day!=6)
	{
		n -= a;
		day++;
	}
	while (n > 0 && day != 8)
	{
		n -= b;
		day++;
	}

	cout << week * 7 + day;

	return 0;
}